Skip to content

Fix brush tool and fill bucket bugs on browser zoom#132

Open
StickmanRed wants to merge 2 commits into
developmentfrom
StickmanRed-brush-browser-zoom
Open

Fix brush tool and fill bucket bugs on browser zoom#132
StickmanRed wants to merge 2 commits into
developmentfrom
StickmanRed-brush-browser-zoom

Conversation

@StickmanRed

Copy link
Copy Markdown
Collaborator

This resolves issue #95 and hopefully issue Weird UI Glitch. For the brush tool, zooming out messes up the size attributes of Wick's canvas element: the width/height attributes of the canvas become scaled down from the true width and height. But the brush tool's canvas uses the smaller width/height attributes as it true size, which is why the brush strokes keep getting cut off.

For the fill bucket, I have no idea why the solution works

@StickmanRed StickmanRed linked an issue Jun 3, 2026 that may be closed by this pull request
@BaronAWC

Copy link
Copy Markdown
Collaborator

When using the brush, the size of the cursor does not properly scale with what you see being drawn on the screen. This is because the cursor's "zoom" is always at 100%, rather than whatever percent the tab is at.

I found this decade-old repo (https://github.com/tombigel/detect-zoom) that actually still works, which we could use to scale the brush/eraser cursor accordingly. Alternatively we can change the cursor to be drawn directly on the website instead of using the cursor (which could arguably be better, so that we can work around the maximum cursor size).

There are 2 more bugs I noticed that come from Wick, those being 1) if you zoomed in or out during the current session, the eraser gets weirdly offset/zoomed before doing the erase and 2) if you zoom in during the session, the resolution of the canvas tanks. both of these get fixed by reloading for the most part, the exception is that for the second bug, the raster brushstroke still looks a bit more blurry.

Didn't notice any new bugs from this though, so that's good. If these issues are easy to fix we can do them, but probably no need to hold back 1.0.2 for these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] cant draw in corner

2 participants